using System;
using System.Collections.Generic;
using System.IO;

namespace ns25
{
	internal class Class247
	{
		internal class Class248
		{
			private const uint uint_0 = 1540483477u;

			private const int int_0 = 24;

			public unsafe static uint smethod_0(byte[] byte_0, uint uint_1 = 3314489979u)
			{
				int num = byte_0.Length;
				if (num == 0)
				{
					return 0u;
				}
				uint num2 = uint_1 ^ (uint)num;
				int num3 = num & 3;
				int num4 = num >> 2;
				fixed (byte* ptr = &byte_0[0])
				{
					uint* ptr2 = (uint*)ptr;
					while (num4 != 0)
					{
						uint num5 = *ptr2;
						num5 *= 1540483477;
						num5 ^= num5 >> 24;
						num5 *= 1540483477;
						num2 *= 1540483477;
						num2 ^= num5;
						num4--;
						ptr2++;
					}
					switch (num3)
					{
					case 1:
						num2 ^= *(byte*)ptr2;
						num2 *= 1540483477;
						break;
					case 2:
						num2 ^= (ushort)(*ptr2);
						num2 *= 1540483477;
						break;
					case 3:
						num2 ^= (ushort)(*ptr2);
						num2 ^= (uint)(((byte*)ptr2)[2] << 16);
						num2 *= 1540483477;
						break;
					}
				}
				num2 ^= num2 >> 13;
				num2 *= 1540483477;
				return num2 ^ (num2 >> 15);
			}
		}

		internal Struct105 struct105_0;

		internal Struct106 struct106_0;

		private IntPtr[] intptr_0;

		public const string string_0 = "HSB-22115.502894";

		public const uint uint_0 = 924983404u;

		public const uint uint_1 = 22115u;

		public const uint uint_2 = 502894u;

		public const string string_1 = "HSB-19776.400748-CN";

		public const uint uint_3 = 95939091u;

		public const uint uint_4 = 19776u;

		public const uint uint_5 = 400748u;

		public static string String_0 => "HSB-22115.502894";

		public static uint UInt32_0 => 924983404u;

		public static uint UInt32_1 => 22115u;

		public static uint UInt32_2 => 502894u;

		internal unsafe void method_0(IntPtr intptr_1)
		{
			IntPtr[] array = new IntPtr[intptr_0.Length];
			intptr_0.CopyTo(array, 0);
			method_4(array, out var arraySegment_, out var arraySegment_2);
			for (int i = arraySegment_.Offset; i < arraySegment_.Count; i++)
			{
				if (arraySegment_.Array[i].ToInt32() > 4194304)
				{
					array[i] = array[i] - 4194304 + intptr_1.ToInt32();
				}
			}
			fixed (IntPtr* ptr = method_2(arraySegment_))
			{
				byte* ptr2 = (byte*)ptr;
				if (ptr2 != null)
				{
					struct105_0 = *(Struct105*)ptr2;
				}
			}
			fixed (IntPtr* ptr3 = method_2(arraySegment_2))
			{
				byte* ptr4 = (byte*)ptr3;
				if (ptr4 != null)
				{
					struct106_0 = *(Struct106*)ptr4;
				}
			}
		}

		internal unsafe void method_1(byte[] byte_0, IntPtr intptr_1)
		{
			intptr_0 = new IntPtr[byte_0.Length / 4];
			byte b = 1;
			fixed (byte* ptr = byte_0)
			{
				uint* ptr2 = (uint*)ptr;
				for (int i = 0; i < intptr_0.Length; i++)
				{
					uint uint_ = ptr2[i];
					IntPtr intPtr = new IntPtr(smethod_0(uint_, b));
					intptr_0[i] = intPtr;
					if ((b = (byte)(b + 1)) == 0)
					{
						b = 0;
					}
				}
			}
			method_0(intptr_1);
		}

		private T[] method_2<T>(ArraySegment<T> arraySegment_0) where T : struct
		{
			List<T> list = new List<T>();
			for (int i = arraySegment_0.Offset; i < arraySegment_0.Offset + arraySegment_0.Count; i++)
			{
				list.Add(arraySegment_0.Array[i]);
			}
			return list.ToArray();
		}

		private static uint smethod_0(uint uint_6, byte byte_0)
		{
			uint num = (uint)((byte_0 << 24) | (byte_0 << 16) | (byte_0 << 8) | byte_0);
			return uint_6 ^ num;
		}

		public void method_3()
		{
			intptr_0 = null;
			struct105_0 = default(Struct105);
			struct106_0 = default(Struct106);
		}

		public static uint smethod_1(string string_2)
		{
			return Class248.smethod_0(File.ReadAllBytes(string_2));
		}

		public void method_4(IntPtr[] intptr_1, out ArraySegment<IntPtr> arraySegment_0, out ArraySegment<IntPtr> arraySegment_1)
		{
			arraySegment_0 = new ArraySegment<IntPtr>(intptr_1, 0, 0);
			arraySegment_1 = new ArraySegment<IntPtr>(intptr_1, 0, 36);
		}

		public void method_5(IntPtr[] intptr_1, out ArraySegment<IntPtr> arraySegment_0, out ArraySegment<IntPtr> arraySegment_1)
		{
			arraySegment_0 = new ArraySegment<IntPtr>(intptr_1, 0, 0);
			arraySegment_1 = new ArraySegment<IntPtr>(intptr_1, 0, 36);
		}
	}
}
